package cn.snmp.mutual.uk.event;

import java.util.*;

import cn.snmp.mutual.uk.stack.Pdu;

public abstract class DecodedPduEvent extends EventObject {
    private static final String version_id = "@(#)$Id: DecodedPduEvent.java,v 1.5 2006/02/09 14:30:18 birgit Exp $ Copyright Westhawk Ltd";
    protected boolean consumed;
    private int hostPort;
    private Pdu pdu;

    public DecodedPduEvent(final Object source, final Pdu p, final int prt) {
        super(source);
        this.consumed = false;
        this.hostPort = -1;
        this.pdu = p;
        this.hostPort = prt;
    }

    public int getHostPort() {
        return this.hostPort;
    }

    public Pdu getPdu() {
        return this.pdu;
    }

    public void consume() {
        this.consumed = true;
    }

    public boolean isConsumed() {
        return this.consumed;
    }
}
